﻿/*
 *********************************************************************
 *    Management Extensions for Windows Windows Server AppFabric     *
 *********************************************************************
 *    Author    : Fatih Boy [fatih@enterprisecoding.com]             *
 *    Web site  : http://www.enterprisecoding.com                    *
 *********************************************************************
 *    License   : GNU Library General Public License (LGPL)          * 
 *********************************************************************
 */

using System;

using Microsoft.Web.Management.Client;
using Microsoft.Web.Management.Server;

using Com.Enterprisecoding.AppFabric.Extensions.Client.Pages.Cache.Accounts;
using Com.Enterprisecoding.AppFabric.Extensions.Client.Pages.Cache.ConfigBackup;

namespace Com.Enterprisecoding.AppFabric.Extensions.Client {
    internal class AppFabricExtensionsModule : Module {
        protected override void Initialize(IServiceProvider serviceProvider, ModuleInfo moduleInfo) {
            base.Initialize(serviceProvider, moduleInfo);
           
            var controlPanel = (IControlPanel)GetService(typeof(IControlPanel));

            var cacheUsersPage = new ModulePageInfo(this, typeof(CacheAccountsPage), Resources.Cache.CacheAccountsPage.Title, Resources.Cache.CacheAccountsPage.Description, Properties.Resources.People_32, Properties.Resources.People_48);
            var cacheClusterBackupPage = new ModulePageInfo(this, typeof(ConfigBackupPage), Resources.Cache.ConfigBackupPage.Title, Resources.Cache.ConfigBackupPage.Description, Properties.Resources.fileexport_32, Properties.Resources.fileexport_48);

            controlPanel.RegisterPage("WCFWFServices", cacheUsersPage);
            controlPanel.RegisterPage("ServiceManagement", cacheUsersPage);

            controlPanel.RegisterPage("WCFWFServices", cacheClusterBackupPage);
            controlPanel.RegisterPage("ServiceManagement", cacheClusterBackupPage);
        }
    }
}